package com.gzf.controller;


import com.gzf.pojo.Animal;
import com.gzf.service.AnimalService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author gzf
 * @since 2019-07-26
 */
@RestController
@RequestMapping("/animal")
public class AnimalController {

    @Resource
    private AnimalService animalService;

    @PostMapping("/insert")
    public Boolean insert(@RequestBody Animal animal) {
        return animalService.save(animal);
    }
}
